Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rdlc.rdl
Class UnitPort

    java.lang.Object
      rdlc.rdl.Field_Named
          rdlc.rdl.UnitPort

All Implemented Interfaces:
  Expression, Field

    public class UnitPort

extends Field_Named

Represents an actual input or output port as declared in a unit.

Version:
  $Revision: 1.20 $
Author:
  Greg Gibeling

Nested Class Summary

Nested classes/interfaces inherited from interface rdlc.rdl.Expression
`Expression.Phase`

Field Summary
`protected Channel` | `channel` The complete channel including all of the end-to-end connectivity, as well as the channel model and message type.
`protected UnitChannel` | `destination` The destination channel.
`protected boolean` | `input` Record whether this is an input.
`protected Message` | `message` The `Message` type which this port sends or receives.
`protected boolean` | `optional` Record whether this in an optional port.
`protected UnitChannel` | `source` The source channel.

Fields inherited from class rdlc.rdl.Field_Named
`iName, instance, namespace, rawDynamicID`

Constructor Summary
`UnitPort(boolean _optional, boolean _input, Message _message)` Full constructor, records the direction and message type of this port.
`UnitPort(java.lang.String _name, Instance _instance, UnitPort _port)` Copy constructor.

Method Summary
`Field` | `copy(java.lang.String _name, Instance _instance)` Create a copy of this field in the given instance.
`Channel` | `getChannel(Log errorLog)` Simple accessor.
`UnitChannel` | `getDestination()` Simple accessor.
`Message` | `getMessage()` Simple accessor.
`UnitChannel` | `getSource()` Simple accessor.
`boolean` | `isInput()` Simple accessor.
`boolean` | `isOptional()` Simple accessor.
`boolean` | `isOutput()` Simple accessor.
`void` | `resolve(java.util.HashSet<Declaration> markSet, Log errorLog, Expression.Phase phase)` Informs the source and destination that they are connected to this unit port.
`void` | `setChannel(Channel _channel, Log errorLog)` Sets the complete channel which includes this port.
`void` | `setDestination(UnitChannel _destination, Log errorLog)` Sets the destination channel of this port directly.
`void` | `setNamespace(Namespace _namespace)` Extends the default setNamespace to set the namespace of the message.
`void` | `setSource(UnitChannel _source, Log errorLog)` Sets the source channel of this port directly.
`java.lang.String` | `toString()` Simple accessor.

Methods inherited from class rdlc.rdl.Field_Named
`getIdentifier, getRawDynamicID, getRequirements, setInstance, setRawDynamicID, typeMatch`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### optional

    protected boolean optional

  Record whether this in an optional port.

### input

    protected boolean input

  Record whether this is an input.

### message

    protected Message message

  The `Message` type which this port sends or receives.

### channel

    protected Channel channel

  The complete channel including all of the end-to-end connectivity, as well as the channel model and message type.

### source

    protected UnitChannel source

  The source channel.

### destination

    protected UnitChannel destination

  The destination channel.

Constructor Detail

### UnitPort

    public UnitPort(boolean _optional,
                    boolean _input,
                    Message _message)

  Full constructor, records the direction and message type of this port.

  Parameters:
    `_optional` - `true` for an optional port.
    `_input` - `true` for an input.
    `_message` - The message type carried by this port.

### UnitPort

    public UnitPort(java.lang.String _name,
                    Instance _instance,
                    UnitPort _port)

  Copy constructor. Used during construction of the unique instance hierarchy for each unit declaration.

  Parameters:
    `_name` - The new name to use.
    `_instance` - The instance this copy will be a member of.
    `_port` - The port declaration to copy.

Method Detail

### copy

    public Field copy(java.lang.String _name,
                      Instance _instance)

  Description copied from interface: `Field`
  Create a copy of this field in the given instance. This is highly useful during dynamic hierarchy copying and during back end generation.

  Parameters:
    `_name` - The new name to use.
    `_instance` - The instance the copy should be a member of.
  See Also:
    `Field.copy(String, Instance)`

### toString

    public java.lang.String toString()

  Simple accessor.

  Overrides:
    `toString` in class `Field_Named`
  Returns:
    A human readable representation of this map for debugging.`

### setNamespace

    public void setNamespace(Namespace _namespace)

  Extends the default setNamespace to set the namespace of the message.

  Specified by:
    `setNamespace` in interface `Expression`
  Overrides:
    `setNamespace` in class `Field_Named`
  Parameters:
    `_namespace` - The namespace in which this field was declared.
  See Also:
    `Field_Named.setNamespace(Namespace)`

### resolve

    public void resolve(java.util.HashSet<Declaration> markSet,
                        Log errorLog,
                        Expression.Phase phase)

  Informs the source and destination that they are connected to this unit port.

  Specified by:
    `resolve` in interface `Expression`
  Overrides:
    `resolve` in class `Field_Named`
  Parameters:
    `markSet` - Complete hash set of declarations on which the caller depends (including itself).
    `errorLog` - Log of errors to be reported to the user.
    `phase` - The phase of resolution to perform.
  See Also:
    `Expression.resolve(HashSet, Log, Phase)`, `Expression.resolve(HashSet, Log, Phase)`

### setSource

    public void setSource(UnitChannel _source,
                          Log errorLog)

  Sets the source channel of this port directly. Used when parsing in positional or named port connections (as opposed to external).

  Parameters:
    `_source` - The unit channel to set as the source.
    `errorLog` - A list of all the errors to be reported.
  See Also:
    `Expression.resolve(HashSet, Log, Phase)`

### setDestination

    public void setDestination(UnitChannel _destination,
                               Log errorLog)

  Sets the destination channel of this port directly. Used when parsing in positional or named port connections (as opposed to external).

  Parameters:
    `_destination` - The unit channel to set as the destination.
    `errorLog` - A list of all the errors to be reported.
  See Also:
    `Expression.resolve(HashSet, Log, Phase)`

### setChannel

    public void setChannel(Channel _channel,
                           Log errorLog)

  Sets the complete channel which includes this port. This is used during complete `Channel` building to back annotate the complete channel.

  Parameters:
    `_channel` - The channel to store.
    `errorLog` - A list of all the errors to be reported.

### isOptional

    public boolean isOptional()

  Simple accessor.

  Returns:
    `true` if this is an optional port.

### isInput

    public boolean isInput()

  Simple accessor.

  Returns:
    `true` if this is an input port.

### isOutput

    public boolean isOutput()

  Simple accessor.

  Returns:
    `true` if this is an output port.

### getSource

    public UnitChannel getSource()

  Simple accessor.

  Returns:
    The soure channel.

### getDestination

    public UnitChannel getDestination()

  Simple accessor.

  Returns:
    The destination channel.

### getMessage

    public Message getMessage()

  Simple accessor.

  Returns:
    The message type which this port carries.

### getChannel

    public Channel getChannel(Log errorLog)

  Simple accessor.

  Returns:
    The `Channel` representing the complete end-to-end channel this is a part of.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD